package main

import (
	"codeGenerator/route"
	"codeGenerator/variable"
	"github.com/savsgio/atreugo/v11"
)

func main() {
	if variable.DB != nil {
		db, _ := variable.DB.DB()
		defer db.Close()
	}

	variable.SERVER = atreugo.New(
		atreugo.Config{
			Addr: "0.0.0.0:1657",
		})

	route.NewCodeAutoRut().CodeAutoRutInit()

	if err := variable.SERVER.ListenAndServe(); err != nil {
		panic(err)
	}

	//input.NewCommand().Start()

}
